/*
* Copyright (C) 2017-2021
* All rights reserved, Designed By
* Copyright authorization contact 18814114118
*/
package com.shop.cereshop.commons.domain.agreement;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 协议表
 * </p>
 *
 * @since 2025-07-29
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@TableName("cere_agreement")
@ApiModel(value = "Agreement", description = "协议表")
@AllArgsConstructor
public class Agreement {

    private static final long serialVersionUID = 1L;

    /**
     * 协议ID
     */
    @ApiModelProperty(value = "协议ID")
    @NotNull(message = "协议ID不能为空")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 协议类型编码(如:USER_AGREEMENT,PRIVACY_POLICY)
     */
    @ApiModelProperty(value = "协议类型编码(如:USER_AGREEMENT,PRIVACY_POLICY)")
    @NotEmpty(message = "协议类型编码(如:USER_AGREEMENT,PRIVACY_POLICY)不能为空")
    @Length(max = 30, message = "协议类型编码(如:USER_AGREEMENT,PRIVACY_POLICY)长度不能超过30")
    @TableField(value = "type_code", condition = LIKE)
    private String typeCode;


    /**
     * 协议类型名称
     */
    @ApiModelProperty(value = "协议类型名称")
    @NotEmpty(message = "协议类型名称不能为空")
    @Length(max = 50, message = "协议类型名称长度不能超过50")
    @TableField(value = "type_name", condition = LIKE)
    private String typeName;


    /**
     * 协议标题
     */
    @ApiModelProperty(value = "协议标题")
    @NotEmpty(message = "协议标题不能为空")
    @Length(max = 100, message = "协议标题长度不能超过100")
    @TableField(value = "title", condition = LIKE)
    private String title;


    /**
     * 协议内容(富文本)
     */
    @ApiModelProperty(value = "协议内容(富文本)")
    @NotEmpty(message = "协议内容(富文本)不能为空")

    @TableField("content")
    private String content;


    /**
     * 协议版本号
     */
    @ApiModelProperty(value = "协议版本号")
    @NotEmpty(message = "协议版本号不能为空")
    @Length(max = 20, message = "协议版本号长度不能超过20")
    @TableField(value = "version", condition = LIKE)
    private String version;


    /**
     * 生效时间
     */
    @ApiModelProperty(value = "生效时间")
    @NotNull(message = "生效时间不能为空")
    @TableField("effective_date")
    private LocalDateTime effectiveDate;


    /**
     * 是否当前版本(0-否,1-是)
     */
    @ApiModelProperty(value = "是否当前版本(0-否,1-是)")
    @NotNull(message = "是否当前版本(0-否,1-是)不能为空")
    @TableField("is_current")
    private Integer isCurrent;


    /**
     * 状态(0-禁用,1-启用)
     */
    @ApiModelProperty(value = "状态(0-禁用,1-启用)")
    @NotNull(message = "状态(0-禁用,1-启用)不能为空")
    @TableField("status")
    private Integer status;


    /**
     * 排序字段
     */
    @ApiModelProperty(value = "排序字段")
    @TableField("sort")
    private Integer sort;


    /**
     * 创建人ID
     */
    @ApiModelProperty(value = "创建人ID")
    @NotNull(message = "创建人ID不能为空")
    @TableField("creator_id")
    private Long creatorId;


    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @NotNull(message = "创建时间不能为空")
    @TableField("create_time")
    private LocalDateTime createTime;


    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @NotNull(message = "更新时间不能为空")
    @TableField("update_time")
    private LocalDateTime updateTime;




}
